<?php
function commonType($status,$status_color,$id,$color){
	if($id)
		return $color?$status_color[$id]:$status[$id];
	else
		return $color?$status_color:$status;	
}

//订单状态
function order_status($id="",$color=false){
	$status=L("order_status");
	$status_color=L("order_status_color");
	return commonType($status,$status_color,$id,$color);
}

//订单状态
function withdraw_status($id="",$color=false){
	$status=L("withdraw_status");
	$status_color=L("withdraw_status_color");
	return commonType($status,$status_color,$id,$color);
}

//对账状态
function statement_status($id="",$color=false){
	$status=L("statement_status");
	$status_color=L("statement_status");
	return commonType($status,$status_color,$id,$color);
}

//所有的信用卡
function creditcardList(){
	return array(
	"visa","mastercard","amex","dinersclub","discover","unionpay","jcb"
	);
}

//黑名单库类型
function blacklistType($id=""){
$arr=array(
1=>"CreditCard",
"Email",
"Phone",
"Country",
"IP"
);
	if($id)
		return $arr[$id];
	else
		return $arr;	
}

//通知类型
function NoticeType($id=""){
$arr=array(
1=>"All",
"Merchant",
"Affiliate"
);
	if($id)
		return $arr[$id];
	else
		return $arr;	
}


//月交易额
function monthlyVolumn($id=""){
	$arr=array(
	1=>"less than 5,000 USD ",
		"5,000 USD~50,000 USD ",
		"50,000 USD~200,000 USD ",
		"more than 200,000 USD ",
	);
	if($id)
		return $arr[$id];
	else
		return $arr;	
}

//拒付率
function chargebackRate($id=""){
		$arr=array(
	1=>" less than 1%",
		"1%~2%",
		"2%~5%",
		"more than 5% "
	);
	if($id)
		return $arr[$id];
	else
		return $arr;	
}

//申请状态
function applicationStatus($id="",$color=false){
	$status=array(
	1=>"Pending",
		"Accept",
		"Discard"
	);
	$status_color=array(
	1=>"Pending",
	"<font color=green>Accept</font>",
	"<font color=red>Discard</font>"
	);
	return commonType($status,$status_color,$id,$color);
}

 //代理商对账单类型
function resellerstatementType($id="",$color=false){
	$status=L("resellerstatement_type");
	$status_color=L("resellerstatement_type");
	return commonType($status,$status_color,$id,$color);
} 
